Flow of Drug Classes Between Clinical Encounters in the Intervention Group. The Sankey diagram illustrates longitudinal transitions in medication class use across six successive clinical encounters among participants in the intervention group. Each vertical column represents one encounter (rx1 through rx6), and each colored node corresponds to a distinct drug class, including gastro‑motility agents, anti-infective agents, antidepressants, anxiolytics, antiallergics, proton pump inhibitors/H2 blockers (PPI/H2B), and an “other” category.
The width of each flow is proportional to the number of participants whose medication class changed or remained stable between encounters.
Early encounters (rx1–rx2) show substantial initiation of gastro‑motility agents and PPI/H2B therapies, while anti-infective and antiallergic agents appear less frequently. Across encounters, the “other” medication category remains a dominant pathway, indicating frequent transitions into heterogeneous or infrequently used drug classes.
By later encounters (rx5–rx6), gastro‑motility agents again form a major proportion of flows, suggesting recurrent or persistent prescribing patterns in this class.
The diagram highlights both persistence (e.g., continuing gastro‑motility therapy across multiple encounters) and variability in medication use, with numerous cross‑class transitions.
Similar graph for the control group is shown above. These graphs reveal distinct patterns in prescribing behavior and medication stability between the intervention (IBS-Smart, Trio-Smart, Combined IBS-Smart & Trio-Smart) and control groups.
Overall Pattern of Medication Transitions
Intervention Group:
The flows show more concentrated transitions, especially throughgastro‑motility agents,anti‑infective agents, andPPI/H2B classes.
The “other” medication category is consistently prominent but becomes especially dominant around rx3–rx5, indicating broad shifts into miscellaneous or less frequent drug classes.
Control Group:
The flows appear more diffuse, with a wider variety of medication classes represented (e.g.,antidiarrheal,analgesic).
Medications are more heterogeneous across encounters, suggesting less clustering into specific therapeutic classes.
from | to | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
analgesic | antiallergic | antidepressant | antidiarrheal | antiinfective | anxiolytic | gastromotility | other | ppi/h2b | Total | ||
analgesic | Count | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
Row pct | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 100.0% | 0.0% | ||
antiallergic | Count | 0 | 0 | 0 | 1 | 1 | 0 | 3 | 17 | 1 | 23 |
Row pct | 0.0% | 0.0% | 0.0% | 4.3% | 4.3% | 0.0% | 13.0% | 73.9% | 4.3% | ||
antidepressant | Count | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 5 | 2 | 10 |
Row pct | 0.0% | 0.0% | 10.0% | 0.0% | 10.0% | 10.0% | 0.0% | 50.0% | 20.0% | ||
antidiarrheal | Count | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
Row pct | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 100.0% | 0.0% | ||
antiinfective | Count | 1 | 0 | 0 | 0 | 7 | 1 | 12 | 10 | 2 | 33 |
Row pct | 3.0% | 0.0% | 0.0% | 0.0% | 21.2% | 3.0% | 36.4% | 30.3% | 6.1% | ||
anxiolytic | Count | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 5 | 0 | 7 |
Row pct | 0.0% | 0.0% | 0.0% | 0.0% | 14.3% | 0.0% | 14.3% | 71.4% | 0.0% | ||
gastromotility | Count | 0 | 6 | 2 | 0 | 4 | 0 | 21 | 30 | 9 | 72 |
Row pct | 0.0% | 8.3% | 2.8% | 0.0% | 5.6% | 0.0% | 29.2% | 41.7% | 12.5% | ||
other | Count | 4 | 9 | 6 | 0 | 14 | 5 | 14 | 189 | 9 | 250 |
Row pct | 1.6% | 3.6% | 2.4% | 0.0% | 5.6% | 2.0% | 5.6% | 75.6% | 3.6% | ||
ppi/h2b | Count | 0 | 6 | 0 | 0 | 1 | 1 | 1 | 13 | 1 | 23 |
Row pct | 0.0% | 26.1% | 0.0% | 0.0% | 4.3% | 4.3% | 4.3% | 56.5% | 4.3% | ||
Total | Count | 5 | 21 | 9 | 1 | 29 | 8 | 52 | 271 | 24 | 420 |
The transition matrix for the intervention group quantitatively supports the Sankey visualization. Consistent with the prominent ‘other’ nodes and thick connecting bands in the Sankey, ‘other’ was the most frequent destination class (271/420 transitions, ~64.5%) and showed high persistence (other→other: 189/250, 75.6%).
from | to | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
analgesic | antiallergic | antidepressant | antidiarrheal | antiinfective | anxiolytic | gastromotility | other | ppi/h2b | Total | ||
analgesic | Count | 1 | 2 | 0 | 0 | 0 | 0 | 2 | 10 | 1 | 16 |
Row pct | 6.2% | 12.5% | 0.0% | 0.0% | 0.0% | 0.0% | 12.5% | 62.5% | 6.2% | ||
antiallergic | Count | 1 | 1 | 2 | 0 | 0 | 1 | 4 | 23 | 6 | 38 |
Row pct | 2.6% | 2.6% | 5.3% | 0.0% | 0.0% | 2.6% | 10.5% | 60.5% | 15.8% | ||
antidepressant | Count | 1 | 1 | 0 | 0 | 0 | 1 | 2 | 13 | 2 | 20 |
Row pct | 5.0% | 5.0% | 0.0% | 0.0% | 0.0% | 5.0% | 10.0% | 65.0% | 10.0% | ||
antidiarrheal | Count | 0 | 0 | 0 | 0 | 1 | 2 | 1 | 5 | 0 | 9 |
Row pct | 0.0% | 0.0% | 0.0% | 0.0% | 11.1% | 22.2% | 11.1% | 55.6% | 0.0% | ||
antiinfective | Count | 0 | 0 | 1 | 1 | 8 | 0 | 7 | 14 | 3 | 34 |
Row pct | 0.0% | 0.0% | 2.9% | 2.9% | 23.5% | 0.0% | 20.6% | 41.2% | 8.8% | ||
anxiolytic | Count | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 9 | 4 | 16 |
Row pct | 12.5% | 6.2% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 56.2% | 25.0% | ||
gastromotility | Count | 0 | 5 | 3 | 2 | 4 | 2 | 12 | 34 | 6 | 68 |
Row pct | 0.0% | 7.4% | 4.4% | 2.9% | 5.9% | 2.9% | 17.6% | 50.0% | 8.8% | ||
other | Count | 14 | 18 | 8 | 3 | 20 | 9 | 18 | 232 | 22 | 344 |
Row pct | 4.1% | 5.2% | 2.3% | 0.9% | 5.8% | 2.6% | 5.2% | 67.4% | 6.4% | ||
ppi/h2b | Count | 1 | 8 | 4 | 1 | 3 | 2 | 4 | 27 | 5 | 55 |
Row pct | 1.8% | 14.5% | 7.3% | 1.8% | 5.5% | 3.6% | 7.3% | 49.1% | 9.1% | ||
Total | Count | 20 | 36 | 18 | 7 | 36 | 17 | 50 | 367 | 49 | 600 |
Medication transitions differed between groups. In the intervention group, movements into the “other” class were most frequent (64.5% of all transitions), with strong persistence within this category (other→other: 75.6%) and notable stability in gastro‑motility agents (gastro→gastro: 29.2%).
In contrast, the control group showed more heterogeneous switching patterns, including greater involvement of PPI/H2B and analgesic classes and lower stability within both “other” (67.4%) and gastro‑motility (17.6%).
Controls also exhibited more frequent transitions from and into PPI/H2B, whereas in the intervention group, anti‑infective agents more often shifted toward gastro‑motility (36.4% vs. 20.6%).
Overall, the transition matrices support the Sankey visualizations: the intervention group demonstrated more consistent medication trajectories, while the control group showed broader and less stable class‑to‑class movement.
In summary, compared with the intervention transition table, the controls show more PPI/H2B involvement, greater switching from gastro‑motility into “other,” and lower persistence within “other” and gastro‑motility. The intervention table shows greater continuity (especially other → other and gastro → gastro) and stronger anti‑infective → gastro‑motility transitions.
from | to | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
analgesic | antiallergic | antidepressant | antidiarrheal | antiinfective | anxiolytic | gastromotility | other | ppi/h2b | Total | ||
analgesic | Count | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
Row pct | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 100.0% | 0.0% | ||
antiallergic | Count | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 8 | 0 | 10 |
Row pct | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 20.0% | 80.0% | 0.0% | ||
antidepressant | Count | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 3 | 1 | 7 |
Row pct | 0.0% | 0.0% | 14.3% | 0.0% | 14.3% | 14.3% | 0.0% | 42.9% | 14.3% | ||
antidiarrheal | Count | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
Row pct | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 100.0% | 0.0% | ||
antiinfective | Count | 0 | 0 | 0 | 0 | 5 | 1 | 7 | 4 | 0 | 17 |
Row pct | 0.0% | 0.0% | 0.0% | 0.0% | 29.4% | 5.9% | 41.2% | 23.5% | 0.0% | ||
anxiolytic | Count | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
Row pct | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 100.0% | 0.0% | ||
gastromotility | Count | 0 | 2 | 2 | 0 | 3 | 0 | 17 | 19 | 8 | 51 |
Row pct | 0.0% | 3.9% | 3.9% | 0.0% | 5.9% | 0.0% | 33.3% | 37.3% | 15.7% | ||
other | Count | 3 | 3 | 4 | 0 | 6 | 0 | 8 | 112 | 6 | 142 |
Row pct | 2.1% | 2.1% | 2.8% | 0.0% | 4.2% | 0.0% | 5.6% | 78.9% | 4.2% | ||
ppi/h2b | Count | 0 | 4 | 0 | 0 | 1 | 0 | 0 | 9 | 1 | 15 |
Row pct | 0.0% | 26.7% | 0.0% | 0.0% | 6.7% | 0.0% | 0.0% | 60.0% | 6.7% | ||
Total | Count | 3 | 9 | 7 | 0 | 16 | 2 | 34 | 158 | 16 | 245 |
from | to | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
analgesic | antiallergic | antidepressant | antiinfective | anxiolytic | gastromotility | other | ppi/h2b | Total | ||
antiallergic | Count | 0 | 0 | 0 | 1 | 0 | 1 | 6 | 1 | 9 |
Row pct | 0.0% | 0.0% | 0.0% | 11.1% | 0.0% | 11.1% | 66.7% | 11.1% | ||
antidepressant | Count | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 3 |
Row pct | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 66.7% | 33.3% | ||
antiinfective | Count | 1 | 0 | 0 | 0 | 0 | 1 | 4 | 1 | 7 |
Row pct | 14.3% | 0.0% | 0.0% | 0.0% | 0.0% | 14.3% | 57.1% | 14.3% | ||
anxiolytic | Count | 0 | 0 | 0 | 1 | 0 | 1 | 4 | 0 | 6 |
Row pct | 0.0% | 0.0% | 0.0% | 16.7% | 0.0% | 16.7% | 66.7% | 0.0% | ||
gastromotility | Count | 0 | 2 | 0 | 1 | 0 | 2 | 5 | 0 | 10 |
Row pct | 0.0% | 20.0% | 0.0% | 10.0% | 0.0% | 20.0% | 50.0% | 0.0% | ||
other | Count | 1 | 4 | 2 | 4 | 5 | 2 | 58 | 3 | 79 |
Row pct | 1.3% | 5.1% | 2.5% | 5.1% | 6.3% | 2.5% | 73.4% | 3.8% | ||
ppi/h2b | Count | 0 | 1 | 0 | 0 | 1 | 1 | 3 | 0 | 6 |
Row pct | 0.0% | 16.7% | 0.0% | 0.0% | 16.7% | 16.7% | 50.0% | 0.0% | ||
Total | Count | 2 | 7 | 2 | 7 | 6 | 8 | 82 | 6 | 120 |
from | to | |||||||
|---|---|---|---|---|---|---|---|---|
antiallergic | antidiarrheal | antiinfective | gastromotility | other | ppi/h2b | Total | ||
antiallergic | Count | 0 | 1 | 0 | 0 | 3 | 0 | 4 |
Row pct | 0.0% | 25.0% | 0.0% | 0.0% | 75.0% | 0.0% | ||
antiinfective | Count | 0 | 0 | 2 | 4 | 2 | 1 | 9 |
Row pct | 0.0% | 0.0% | 22.2% | 44.4% | 22.2% | 11.1% | ||
gastromotility | Count | 2 | 0 | 0 | 2 | 6 | 1 | 11 |
Row pct | 18.2% | 0.0% | 0.0% | 18.2% | 54.5% | 9.1% | ||
other | Count | 2 | 0 | 4 | 4 | 19 | 0 | 29 |
Row pct | 6.9% | 0.0% | 13.8% | 13.8% | 65.5% | 0.0% | ||
ppi/h2b | Count | 1 | 0 | 0 | 0 | 1 | 0 | 2 |
Row pct | 50.0% | 0.0% | 0.0% | 0.0% | 50.0% | 0.0% | ||
Total | Count | 5 | 1 | 6 | 10 | 31 | 2 | 55 |